package com.liukunup.demo.bean;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 接口响应
 * @author Liu Kun
 * @date 2021-03-25 00:15:30
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="接口响应对象", description="用于包装接口响应")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ApiResult {

    private Integer code;

    private Boolean success;

    private String message;

    private Object data;

    public ApiResult(Integer code, Boolean success) {
        this.code = code;
        this.success = success;
    }
}